import { serverBase } from '@/axios/index';
/**
 * 账号密码登陆
 * @param data
 * @returns {Promise<void>}
 */
export const postMpAuthLogin = (data = {}) => serverBase.post('/agent/auth/v1/login/pwd', data, { loading: true });
/**
 * 退出登陆
 * @param data
 * @returns {Promise<void>}
 */
export const postMpAuthLogout = (data = {}) => serverBase.post('/agent/auth/v1/logout', data, { loading: true });
/**
 * 忘记密码-手机验证码
 * @param data
 * @returns {Promise<void>}
 */
export const postMpAuthPhoneCode = (data = {}) => serverBase.post('/agent/auth/v1/phone/code', data, { loading: true });
/**
 * 忘记密码-重置密码
 * @param data
 * @returns {Promise<void>}
 */
export const postMpAuthResetPwd = (data = {}) => serverBase.post('/agent/auth/v1/reset/pwd', data, { loading: true });
/**
 * 微信auth2授权回调
 * @param data
 * @returns {Promise<void>}
 */
export const postMpAuthWxCall = (data = {}) => serverBase.post('/agent/auth/v1/wx/callback', data, { loading: true });
/**
 * 微信auth2授权跳转
 * @param data
 * @returns {Promise<void>}
 */
export const postMpAuthWxLogin = (data = {}) => serverBase.post('/agent/auth/v1/wx/login', data, { loading: true });



/**
 * 查询设备分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postMpDevicePage = (data = {}) => serverBase.post('/mp/device/v1/page', data, { loading: true });
/**
 * 查询设备详情
 * @param data
 * @returns {Promise<void>}
 */
export const postMpDeviceDetail = (data = {}) => serverBase.post('/mp/device/v1/detail', data, { loading: true });
/**
 * 结束订单
 * @param data
 * @returns {Promise<void>}
 */
export const postMpDeviceEndOrder = (data = {}) => serverBase.post('/mp/device/v1/end/order', data, { loading: true });
/**
 * 添加设备
 * @param data
 * @returns {Promise<void>}
 */
export const postMpDeviceAdd = (data = {}) => serverBase.post('/mp/device/v1/add', data, { loading: true });
/**
 * 查询更换原料记录分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postMpDeviceMaterialPage = (data = {}) => serverBase.post('/mp/device/v1/material/log/page', data, { loading: true });
/**
 * 查询更换原料记录统计
 * @param data
 * @returns {Promise<void>}
 */
export const postMpDeviceMaterialStatis = (data = {}) => serverBase.post('/mp/device/v1/material/log/statistics', data, { loading: true });
/**
 * 设备统计
 * @param data
 * @returns {Promise<void>}
 */
export const postMpDeviceStatistics = (data = {}) => serverBase.post('/mp/device/v1/statistics', data, { loading: true });
/**
 * 查询设备使用情况
 * @param data
 * @returns {Promise<void>}
 */
export const postMpDeviceUsage = (data = {}) => serverBase.post('/mp/device/v1/usage', data, { loading: true });


// 用户信息

/**
 * 我的店铺
 * @param data
 * @returns {Promise<void>}
 */
export const postMpShopList = (data = {}) => serverBase.post('/mp/user/v1/shop/list', data, { loading: true });

/**
 * 切换/选择店铺
 * @param data
 * @returns {Promise<void>}
 */
export const postMpShopSwitch = (data = {}) => serverBase.post('/mp/user/v1/switch/shop', data, { loading: true });


/**
 * 用户信息
 * @param data
 * @returns {Promise<void>}
 */
export const postMpUserInfo = (data = {}) => serverBase.post('/mp/user/v1/info', data, { loading: true });

/**
 * 新增员工
 * @param data
 * @returns {Promise<void>}
 */
export const postMpShopUserAdd = (data = {}) => serverBase.post('/mp/user/v1/shop/user/add', data, { loading: true });
/**
 * 删除员工
 * @param data
 * @returns {Promise<void>}
 */
export const postMpShopUserDelete = (data = {}) => serverBase.post('/mp/user/v1/shop/user/delete', data, { loading: true });

/**
 * 查询员工列表
 * @param data
 * @returns {Promise<void>}
 */
export const postMpShopUserList = (data = {}) => serverBase.post('/mp/user/v1/shop/user/list', data, { loading: true });





/**
 * 创建调用jsapi时所需要的签名
 * @param data
 * @returns {Promise<void>}
 */
export const postJsapiSignature = (data = {}) => serverBase.post('/mp/wx/v1/create/jsapi/signature', data, { loading: true });
/**
 * 查询剩余信用额度
 * @param data
 * @returns {Promise<void>}
 */
export const postBusinessBalance = (data = {}) => serverBase.post('/mp/business/v1/balance', data, { loading: true });


/**
 * 查询账单分页列表
 * @param data
 * @returns {Promise<void>}
 */
export const postBillPage = (data = {}) => serverBase.post('/mp/business/v1/bill/page', data, { loading: true });
/**
 * 支付账单
 * @param data
 * @returns {Promise<void>}
 */
export const postBillPay = (data = {}) => serverBase.post('/mp/business/v1/bill/pay', data, { loading: true });


/**
 * 查询服务量
 * @param data
 * @returns {Promise<void>}
 */
export const postBillServiceNum = (data = {}) => serverBase.post('/mp/business/v1/service/num', data, { loading: true });
/**
 * 查询分类对比
 * @param data
 * @returns {Promise<void>}
 */
export const postBusinessClassContrast = (data = {}) => serverBase.post('/mp/business/v1/classify/contrast', data, { loading: true });
/**
 * 查询顾客消费次数分布
 * @param data
 * @returns {Promise<void>}
 */
export const postBusinessConsumption = (data = {}) => serverBase.post('/mp/business/v1/customer/consumption', data, { loading: true });
/**
 * 查询客流分析
 * @param data
 * @returns {Promise<void>}
 */
export const postBusinessNum = (data = {}) => serverBase.post('/mp/business/v1/customer/num', data, { loading: true });
/**
 * 查询服务趋势
 * @param data
 * @returns {Promise<void>}
 */
export const postBusinessServiceTrends = (data = {}) => serverBase.post('/mp/business/v1/service/trends', data, { loading: true });






// 我的顾客

/**
 * 顾客分页查询
 * @param data
 * @returns {Promise<void>}
 */
export const postCustomerPage = (data = {}) => serverBase.post('/mp/customer/v1/page', data, { loading: true });
/**
 * 顾客详情
 * @param data
 * @returns {Promise<void>}
 */
export const postCustomerDetail = (data = {}) => serverBase.post('/mp/customer/v1/detail', data, { loading: true });
/**
 * 近期新增顾客分页查询
 * @param data
 * @returns {Promise<void>}
 */
export const postCusRecentAddPage = (data = {}) => serverBase.post('/mp/customer/v1/recent/add/page', data, { loading: true });
/**
 * 近期返店顾客分页查询
 * @param data
 * @returns {Promise<void>}
 */
export const postCusRecentRePage = (data = {}) => serverBase.post('/mp/customer/v1/recent/return/page', data, { loading: true });
/**
 * 顾客统计
 * @param data
 * @returns {Promise<void>}
 */
export const postCustomerStatistics = (data = {}) => serverBase.post('/mp/customer/v1/statistics', data, { loading: true });


// 代理商
/**
* 查询门店设备分页列表
* @param data
* @returns {Promise<void>}
*/
export const postAgentShopDevicePage = (data = {}) => serverBase.post('/agent/shop/v1/device/page', data, { loading: true });
/**
* 查询代理订单分页列表
* @param data
* @returns {Promise<void>}
*/
export const postAgentShopOrderPage = (data = {}) => serverBase.post('/agent/shop/v1/order/page', data, { loading: true });
/**
* 查询代理门店分页列表
* @param data
* @returns {Promise<void>}
*/
export const postAgentShopPage = (data = {}) => serverBase.post('/agent/shop/v1/shop/page', data, { loading: true });
/**
* 查询代理门店分页列表
* @param data
* @returns {Promise<void>}
*/
export const postAgentUserInfo = (data = {}) => serverBase.post('/agent/user/v1/info', data, { loading: true });
/**
* 代理商钱包
* @param data
* @returns {Promise<void>}
*/
export const postAgentUserWallet = (data = {}) => serverBase.post('/agent/user/v1/wallet', data, { loading: true });
/**
* 代理商钱包
* @param data
* @returns {Promise<void>}
*/
export const postAgentUserWalletLogPage = (data = {}) => serverBase.post('/agent/user/v1/wallet/log/page', data, { loading: true });
/**
* 账号密码登陆
* @param data
* @returns {Promise<void>}
*/
export const postAgentAuthLogin = (data = {}) => serverBase.post('/agent/auth/v1/login/pwd', data, { loading: true });
/**
* 退出登陆
* @param data
* @returns {Promise<void>}
*/
export const postAgentAuthLogout = (data = {}) => serverBase.post('/agent/auth/v1/logout', data, { loading: true });
/**
* 忘记密码-手机验证码
* @param data
* @returns {Promise<void>}
*/
export const postAgentAuthPhoneCode = (data = {}) => serverBase.post('/agent/auth/v1/phone/code', data, { loading: true });
/**
* 忘记密码-重置密码
* @param data
* @returns {Promise<void>}
*/
export const postAgentAuthResetPwd = (data = {}) => serverBase.post('/agent/auth/v1/reset/pwd', data, { loading: true });
/**
* 忘记密码-检验手机验证码
* @param data
* @returns {Promise<void>}
*/
export const postAgentAuthCheckCode = (data = {}) => serverBase.post('/agent/auth/v1/check/phone/code', data, { loading: true });
/**
* 微信auth2授权回调
* @param data
* @returns {Promise<void>}
*/
export const postAgentAuthWxCallBack = (data = {}) => serverBase.post('/agent/auth/v1/wx/callback', data, { loading: true });
/**
* 微信auth2授权跳转
* @param data
* @returns {Promise<void>}
*/
export const postAgentAuthWxLogin = (data = {}) => serverBase.post('/agent/auth/v1/wx/login', data, { loading: true });